﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 例2._3_对称平方数1_CSharp
{
    class Program
    {
        static void Main(string[] args)
		{
			for (int i = 0; i <= 256; i++)
			{
				int a = i * i;
				if (a == Reverse(a))
				{
                    Console.WriteLine(i);
				}
			}
		}

		static int Reverse(int num)
		{
			int revx = 0;
			while (num != 0)
			{
				revx *= 10;
				revx += num % 10;
				num /= 10;
			}
			return revx;
		}
	}
}
